package com.lyfam.vaadin.service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class FakeServices
{
    public static List<String> getCompanyList()
    {
        return Arrays.asList(new String[] {"Google", "Microsoft", "IBM"});
    }
    
    public static List<String> getProductList()
    {
        return Arrays.asList(new String[] {"Product A", "Product B"});
    }
        
    public static List<String> getSubProductList(String product)
    {
        if ("Product A".equals(product))
        {
            return Arrays.asList(new String[] {"Sub A1", "Sub A2" });
        }
        else if ("Product B".equals(product))
        {
            return Arrays.asList(new String[] {"Sub B1", "Sub B2" });
        }
        else
        {
            return new ArrayList<String>();
        }
    }
    
    public static List<String> getRelatedProductList(String subproduct)
    {
        if ("Sub A1".equals(subproduct))
        {
            return Arrays.asList(new String[] {"Related A1-1", "Related A1-2" });
        }
        else if ("Sub B2".equals(subproduct))
        {
            return Arrays.asList(new String[] {"Related B2-1", "Related B2-2" });
        }
        else
        {
            return new ArrayList<String>();
        }
    }
}
